#   Copyright 2006 Jerome Lacoste (jerome@coffeebreaks.org)
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
class WorklogSearchCriteria

  attr_reader :client_id

  def from_date 
    @time_period.from
  end

  def to_date 
    @time_period.to
  end

#  def initialize(params)
#    @time_period = TimePeriod.new(params['from_date'], params['to_date'])
#    #if not valid?
#  end

  def initialize(time_period, client_id)
    @time_period = TimePeriod.new(time_period.from, time_period.to)
    @client_id = client_id
    #if not valid?
  end

  #def initialize(from_date, to_date)
  #  @time_period = TimePeriod.new(from_date, to_date)
  #  #if not valid?
  #end

  def to_s
    "WorlogSearchCriteria: #@time_period #@client_id"
  end

#  def valid?
    
#  end

end
